{extends file="main.tpl"}
{block name=head}
  <script>
  	$(document).ready(function(){
  	  $.ajax({
	      url:'itemQtyAjax.php',
	      data:{ tableId: {$tableVar}, itemId: 21, tablePart: '{$tablePartVar}'},
	      dataType:'HTML',
	      type:'POST',
	        
	      success:function(msg){
         	$('#itemQty_21').val(msg);
	      }
      });
      $.ajax({
	      url:'itemQtyAjax.php',
	      data:{ tableId: {$tableVar}, itemId: 22, tablePart: '{$tablePartVar}'},
	      dataType:'HTML',
	      type:'POST',
	        
	      success:function(msg){
         	$('#itemQty_22').val(msg);
	      }
      });
  		//////////////////////////////
  		$('#plus21').mousedown(function(){
      var quantity=$('#itemQty_21').val();
     	$('#itemQty_21').val(parseInt(quantity) + 1 );
     	$.ajax({
  	    url:'itemAjax.php',
  	    data:{ waiterId: {$waiterVar}, tableId: {$tableVar}, quantity: $('#itemQty_21').val(), itemId: 21, tablePart: '{$tablePartVar}' },
  	    dataType:'HTML',
  	    type:'POST',
  	      
  	    success:function(msg){}
      });
    });
    
    $('#minus21').mousedown(function(){
     		var quantity=$('#itemQty_21').val();
     		if(quantity > 0)
     		{
     		$('#itemQty_21').val(parseInt(quantity) - 1 );
     	  $.ajax({
  	      url:'itemAjax.php',
  	      data:{ waiterId: {$waiterVar}, tableId: {$tableVar}, quantity: $('#itemQty_21').val(), itemId: 21, tablePart: '{$tablePartVar}' },
  	      dataType:'HTML',
  	      type:'POST',
  	      
  	      success:function(msg){}
        });
      }
      });
    
     $('#plus22').mousedown(function(){
      var quantity=$('#itemQty_22').val();
     	$('#itemQty_22').val(parseInt(quantity) + 1 );
     	$.ajax({
  	    url:'itemAjax.php',
  	    data:{ waiterId: {$waiterVar}, tableId: {$tableVar}, quantity: $('#itemQty_22').val(), itemId: 22, tablePart: '{$tablePartVar}' },
  	    dataType:'HTML',
  	    type:'POST',
  	      
  	    success:function(msg){}
      });
    });
    
    $('#minus22').mousedown(function(){
     		var quantity=$('#itemQty_22').val();
     		if(quantity > 0)
     		{
     		$('#itemQty_22').val(parseInt(quantity) - 1 );
     	  $.ajax({
  	      url:'itemAjax.php',
  	      data:{ waiterId: {$waiterVar}, tableId: {$tableVar}, quantity: $('#itemQty_22').val(), itemId: 22, tablePart: '{$tablePartVar}' },
  	      dataType:'HTML',
  	      type:'POST',
  	      
  	      success:function(msg){}
        });
      }
      });
  	});
  </script>
{/block}
{block name=body}
  <h3 align="center"><font size="10" color="red">Pizzas</font></h3>
  <center>
    <table>
      <tr>
        <td valign="top">
        	<table style="float:left" id="itemTable" border="1" cellpadding="3" cellspacing="2" >
            <tr id="ice" class="ice">
              
              <td><font size="4"> Pizza <br />Rs. : 150.00</font>
         	      <br />
                <button id="plus21" class="sum">+</button>
                <input  type="text" name="1"  value="0" class="quntity" id="itemQty_21"/>
                <button id="minus21" class="sum">-</button>
              </td>
              
              <td><font size="4"> Shiv Pizza <br />Rs. : 180.00</font>
         	      <br />
                <button id="plus22" class="sum">+</button>
                <input  type="text" name="1" class="quntity" value="0" onchange="changeQuantityFun();" id="itemQty_22"  />
                <button id="minus22" class="sum">-</button>
              </td>
          </table>
          <table align="center" border="0">
            <td>
              <iframe src="itemMenu.php?waiter={$waiterVar}&table={$tableVar}&tablePart={$tablePartVar}" width="400" height="400"></iframe>
            </td>
          </table>
        </td>
        <td>
          <table align="right" border="0">
            <tr>
              <td>
                <iframe src="selectedTable.php?waiterId={$waiterVar}&tableId={$tableVar}&tablePart={$tablePartVar}" width="400" height="1000"></iframe>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </center>
{/block}